﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="recImpositionHistorylist.aspx.cs"
    Inherits="SIPO.Web.Lists.Transaction.recImpositionHistorylist" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server" id="Head1">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <link type="text/css" rel="stylesheet" href="<%= ResolveUrl("~/styles/ui.jqgrid.css") %>" />
    <script type="text/javascript" src="<%= ResolveUrl("~/scripts/i18n/grid.locale-id.js") %>"></script>
    <script type="text/javascript" src="<%= ResolveUrl("~/scripts/jquery.jqGrid.min.js") %>"></script>
    <script type="text/javascript" src="<%= ResolveUrl("~/scripts/jquery.fmatter.js") %>"></script>
    <script type="text/javascript" src="<%= ResolveUrl("~/scripts/helper.js") %>"></script>
    <br />
    <table id="tblHistoriKoreksi" class="scroll" cellpadding="0" cellspacing="0">
    </table>
    <div id="pgrRole" class="scroll">
    </div>
    <br />
    <button id="btnClose" type="button">
        Tutup</button>
    <script type="text/javascript">
        $("#btnClose").button({ icons: { primary: "ui-icon-close"} });

    </script>
    <script type="text/javascript">
        var ImpositionID = '<%= Request.Params["ImpositionID"] %>';
        var handlerUrl = '<%= ResolveUrl("~/AjaxHandler/Transaction/recImpositionhandler.ashx") %>';

        $('#tblHistoriKoreksi').jqGrid({
            url: handlerUrl + '?method=getdatabyimpositionid&ImpositionId=' + ImpositionID + '',
            datatype: 'json',
            colNames: ['ID', 'Tahun Laporan Keuangan', 'Tanggal Transaksi', 'Nilai Pengenaan OJK (Rp)', 'Nilai Pengenaan Debitur (Rp)'],
            colModel: [
                    { name: 'recImpositionDetail.ImpositionDetailID', hidden: true, index: 'ImpositionDetailID', width: 5 },
                    { name: 'YearReport', index: 'YearReport', width: 170 },
                    { name: 'recImpositionDetail.TransDate', index: 'TransDate', align: 'center', width: 120, formatter: 'date', formatoptions: { newformat: 'd M Y'} },
                    { name: 'recImpositionDetail.OJKValue', index: 'recImpositionDetail.OJKValue', width: 150, formatter: 'currency', formatoptions: { prefix: '', suffix: '', thousandsSeparator: ',' }, align: 'right' },
                    { name: 'recImpositionDetail.DebtorValue', index: 'recImpositionDetail.DebtorValue', width: 160, formatter: 'currency', formatoptions: { prefix: '', suffix: '', thousandsSeparator: ',' }, align: 'right' }
           	],
            rowNum: 10,
            id: 'ImpositionDetailID',
            multiselect: true,
            rowList: [5, 10, 15, 20],
            pager: '#pgrRole',
            sortname: 'recImpositionDetail.TransDate',
            sortorder: "asc",
            viewrecords: true,
            jsonReader: { repeatitems: false },            
            height: '100%',
            caption: 'Histori Koreksi',
            ajaxGridOptions: { cache: false }
        });

        $("#tblHistoriKoreksi").jqGrid('navGrid', '#pgrRole', { edit: false, add: false, del: false, searchtext: 'Search', refreshtext: 'Refresh' },
        {}, {}, {}, { closeOnEscape: true, multipleSearch: true, closeAfterSearch: true });

        $('#btnClose').click(function () {
            parent.$('#dialog').dialog('close');

            return false;
        });
    
    </script>
    </form>
</body>
</html>
